package com.xbongbong.saas.model;

import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.saas.domain.entity.StockSurplusRecordEntity;

import java.util.List;
import java.util.Map;

public interface StockSurplusRecordModel {
    /**
     * 入库单产品数据插入
     * @param stockSurplusRecordEntity 供应商实体
     * @author lee
     * @date 2020/1/13 16:51
     * @since v1.0
     * @version v1.0
     * @return Integer
     */
    Integer insert(StockSurplusRecordEntity stockSurplusRecordEntity) throws XbbException;
    /**
     * 入库单产品数据更新
     * @param stockSurplusRecordEntity 供应商实体
     * @author lee
     * @date 2020/1/13 16:51
     * @since v1.0
     * @version v1.0
     * @throws XbbException 异常
     * @return Integer
     */
    Integer update(StockSurplusRecordEntity stockSurplusRecordEntity) throws XbbException;

    /**
     * 根据索引查询数据
     *
     * @param param 查询参数
     * @author lee
     * @date 2020/1/13 16:51
     * @since v1.0
     * @version v1.0
     * @return List<ProductEntityExt>
     **/
    List<StockSurplusRecordEntity> findEntitys(Map<String, Object> param);

    Integer save(StockSurplusRecordEntity stockSurplusRecordEntity);

    void insertBatch(List<StockSurplusRecordEntity> stockSurplusRecordEntityList) throws XbbException;

    List<StockSurplusRecordEntity> getLatestFlowBillByWarehouseKey(Map<String, Object> param);

    /**
     * 批量更新
     * @author 吴峰
     * @date 2019/3/4 20:03
     * @param list 更新的数据
     * @param corpid 公司id
     * @return java.lang.Integer
     */
    void updateBatch(List<StockSurplusRecordEntity> list, String corpid) throws XbbException;

    void deleteAllByCorpId(String corpid);

    void insertRecordsFromProductWarehouse(String corpid, Long date);

    void batchInsertRecordsFromProductWarehouse(Map<String, Object> param);

    void deleteByAddTime(Map<String, Object> param);
}
